#include "color.hpp"

Color::Color(const double _red,const double _green,const double _blue) :red(_red), green(_green), blue(_blue) 
{ }

Color::Color(void) : red(0.0) , green(0.0) , blue(0.0) { }

Color::~Color(void) { }

void Color::set(const double _red,const double _green,const double _blue) { 
	red = _red;
	green = _green;
	blue = _blue ;

}

void Color::set(const Color& _color) {
	red = _color.get_r();
	green = _color.get_g();
	blue = _color.get_b();
}
void Color::set_r(const double _red) { red = _red; }

void Color::set_g(const double _green) { green = _green; }

void Color::set_b(const double _blue) { blue = _blue; }

const double Color::get_r(void) const { return red; }

const double Color::get_g(void) const { return green; }

const double Color::get_b(void) const { return blue; }

const Color Color::operator+(const Color& _color) const {
    return Color(red + _color.red,green + _color.green,blue + _color.blue);
}

const Color Color::operator*(const Color& _color) const {
    return Color(red * _color.red,green * _color.green,blue * _color.blue);
}
 
const Color Color::operator*(const double _value) const {
    return Color(red * _value,green * _value,blue * _value);
}


